<template>
  <div>
    <header class="header">
      <span v-if="$route.meta.back" class="back" @click="$router.go(-1)">返回</span>
      <div class="text">{{$route.meta.title}}</div>
      <span v-show="$route.path === '/login'" class="toreg" @click="$router.push('/register')">去注册</span>
    </header>
    <router-view class="con"></router-view>
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
.header {
  width: 100vw;
  height: 12vw;
  background: #ff4400;
  position: fixed;
  left: 0;
  top: 0;
}
.back,
.toreg {
  position: absolute;
  top: 0;
  line-height: 12vw;
  font-size: 4vw;
  font-weight: bold;
  color: #fff;
}
.back {
  left: 2.6667vw;
}
.toreg {
  right: 2.6667vw;
}
.text {
  width: 100vw;
  line-height: 12vw;
  font-size: 6vw;
  font-weight: bold;
  text-align: center;
  color: #fff;
}
.con {
  margin-top: 12vw;
}
</style>